package com.queming.core.exception;

/**
 * @author chencidiao
 * @date 2022/04/19 19:30
 * 错误类型
 **/
public enum ExceptionType {
    INNER_ERROR(500, "系统内部错误"),
    UNAUTHORIZED(401, "未登录"),
    BAD_REQUEST(400, "请求错误"),
    FORBIDDEN(403, "无权操作"),
    NOT_FOUND(404, "未找到"),
    USER_DUPLICATE_ERROR(4000, "用户名重复"),
    USER_UNKNOW_ERROR(4001, "用户名不存在"),
    USER_PASSWORD_NOT_MATCH(4002, "用户名或密码错误"),
    USER_NOT_ENABLE(5000, "用户未启用"),
    USER_LOCKED(5001, "用户被锁定"),
    MUSIC_NOT_FOUND(40402001, "歌曲不存在"),
    FILE_NOT_FOUND(40403001,"文件不存在"),
    PLAYLIST_NOT_FOUND(40404001,"歌单不存在不存在"),
    FILE_NOT_PERMISSION(40303002,"当前用户无权修改文件"),
    ARTIST_NOT_FOUND(40405001,"歌手不存在"),
    ALBUM_NOT_FOUND(40406001,"专辑不存在");




    private final Integer code;
    private final String message;

    ExceptionType(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
